package com.surveypark.struts2.action;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import com.surveypark.domain.Log;
import com.surveypark.service.LogService;

@Controller("logAction")
@Scope("prototype")
public class LogAction extends BaseAction<Log> {

	private static final long serialVersionUID = -5435794037630152354L;

	@Resource
	private LogService logService;
	private List<Log> allLogs;
	
	public List<Log> getAllLogs() {
		return allLogs;
	}

	public void setAllLogs(List<Log> allLogs) {
		this.allLogs = allLogs;
	}

	public String findAllLogs(){
		this.allLogs = logService.findNearestLogs();//查找最近的日志
		return "logListPage";
	}
}
